package jess;

public class NTimes implements Userfunction {

	@Override
	public String getName() {
		
		return "n-times";
	}

	@Override
	public Value call(ValueVector vv, Context c) throws JessException {

		int count = vv.get(1).intValue(c);
		Value expr = vv.get(2);
		for (int i=0; i<count; ++i)
		expr.resolveValue(c);
		return Funcall.TRUE;
	}

}
